import torch
from config import config
from datam import *
from model import *
from pytorch_lightning import Trainer
if __name__ == '__main__':
    # data_mnist = DataM("../data/",32,0)
    data_alz = DataM(config.data_dir,12,config.AVAIL_GPUS,224)
    data_alz.setup()

    model = Model.load_from_checkpoint(config.modelPATH+"/last.ckpt")
    model.eval()
    data,label = next(iter(data_alz.test_dataloader()))
    result1 = model(data)
    trainer = Trainer(accelerator='gpu', devices=1)
    result = trainer.test(model,data_alz.test_dataloader())
    print(result,result1)



